
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Glx
	{
		/// <summary>
		/// [GLX] Value of GLX_RENDERER_VENDOR_ID_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_VENDOR_ID_MESA = 0x8183;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_DEVICE_ID_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_DEVICE_ID_MESA = 0x8184;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_VERSION_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_VERSION_MESA = 0x8185;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_ACCELERATED_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_ACCELERATED_MESA = 0x8186;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_VIDEO_MEMORY_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_VIDEO_MEMORY_MESA = 0x8187;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA = 0x8188;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_PREFERRED_PROFILE_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_PREFERRED_PROFILE_MESA = 0x8189;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA = 0x818A;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA = 0x818B;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_OPENGL_ES_PROFILE_VERSION_MESA = 0x818C;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA = 0x818D;

		/// <summary>
		/// [GLX] Value of GLX_RENDERER_ID_MESA symbol.
		/// </summary>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public const int RENDERER_ID_MESA = 0x818E;

		/// <summary>
		/// [GLX] glXQueryCurrentRendererIntegerMESA: Binding for glXQueryCurrentRendererIntegerMESA.
		/// </summary>
		/// <param name="attribute">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="value">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public static bool QueryCurrentRenderMESA(int attribute, uint[] value)
		{
			bool retValue;

			unsafe {
				fixed (uint* p_value = value)
				{
					Debug.Assert(Delegates.pglXQueryCurrentRendererIntegerMESA != null, "pglXQueryCurrentRendererIntegerMESA not implemented");
					retValue = Delegates.pglXQueryCurrentRendererIntegerMESA(attribute, p_value);
					LogCommand("glXQueryCurrentRendererIntegerMESA", retValue, attribute, value					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GLX] glXQueryCurrentRendererStringMESA: Binding for glXQueryCurrentRendererStringMESA.
		/// </summary>
		/// <param name="attribute">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public static string QueryCurrentRendererStringMESA(int attribute)
		{
			IntPtr retValue;

			Debug.Assert(Delegates.pglXQueryCurrentRendererStringMESA != null, "pglXQueryCurrentRendererStringMESA not implemented");
			retValue = Delegates.pglXQueryCurrentRendererStringMESA(attribute);
			LogCommand("glXQueryCurrentRendererStringMESA", PtrToString(retValue), attribute			);
			DebugCheckErrors(retValue);

			return (PtrToString(retValue));
		}

		/// <summary>
		/// [GLX] glXQueryRendererIntegerMESA: Binding for glXQueryRendererIntegerMESA.
		/// </summary>
		/// <param name="dpy">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="screen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="renderer">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="attribute">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="value">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public static bool QueryRenderMESA(IntPtr dpy, int screen, int renderer, int attribute, uint[] value)
		{
			bool retValue;

			unsafe {
				fixed (uint* p_value = value)
				{
					Debug.Assert(Delegates.pglXQueryRendererIntegerMESA != null, "pglXQueryRendererIntegerMESA not implemented");
					retValue = Delegates.pglXQueryRendererIntegerMESA(dpy, screen, renderer, attribute, p_value);
					LogCommand("glXQueryRendererIntegerMESA", retValue, dpy, screen, renderer, attribute, value					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GLX] glXQueryRendererStringMESA: Binding for glXQueryRendererStringMESA.
		/// </summary>
		/// <param name="dpy">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="screen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="renderer">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="attribute">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GLX_MESA_query_renderer")]
		public static string QueryRendererStringMESA(IntPtr dpy, int screen, int renderer, int attribute)
		{
			IntPtr retValue;

			Debug.Assert(Delegates.pglXQueryRendererStringMESA != null, "pglXQueryRendererStringMESA not implemented");
			retValue = Delegates.pglXQueryRendererStringMESA(dpy, screen, renderer, attribute);
			LogCommand("glXQueryRendererStringMESA", PtrToString(retValue), dpy, screen, renderer, attribute			);
			DebugCheckErrors(retValue);

			return (PtrToString(retValue));
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GLX_MESA_query_renderer")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool glXQueryCurrentRendererIntegerMESA(int attribute, uint* value);

			[RequiredByFeature("GLX_MESA_query_renderer")]
			internal static glXQueryCurrentRendererIntegerMESA pglXQueryCurrentRendererIntegerMESA;

			[RequiredByFeature("GLX_MESA_query_renderer")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate IntPtr glXQueryCurrentRendererStringMESA(int attribute);

			[RequiredByFeature("GLX_MESA_query_renderer")]
			internal static glXQueryCurrentRendererStringMESA pglXQueryCurrentRendererStringMESA;

			[RequiredByFeature("GLX_MESA_query_renderer")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool glXQueryRendererIntegerMESA(IntPtr dpy, int screen, int renderer, int attribute, uint* value);

			[RequiredByFeature("GLX_MESA_query_renderer")]
			internal static glXQueryRendererIntegerMESA pglXQueryRendererIntegerMESA;

			[RequiredByFeature("GLX_MESA_query_renderer")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate IntPtr glXQueryRendererStringMESA(IntPtr dpy, int screen, int renderer, int attribute);

			[RequiredByFeature("GLX_MESA_query_renderer")]
			internal static glXQueryRendererStringMESA pglXQueryRendererStringMESA;

		}
	}

}
